﻿function doing(action, contentid, NodeID) {
    var query, returnValue;

    switch (action) {
        case 'del':
            if (!confirm('确认删除该链接吗？')) {
                break;
            }
            var returntext = $.ajax({ type: "POST", url: 'content_saveAdvance.aspx', data: 'ac=ajax_delete_doc&nodeid=' + NodeID + '&id=' + contentid, async: false }).responseText;
            //alert(returntext); //调试错误信息
            var msg = eval("msg=" + returntext);
            if (msg.result == "1") {
                alert("操作成功");
                window.location.reload(true);
            }
            else {
                alert(msg.msg); //出错信息

            }
            document.location.reload();
            return false;
            break;

        case 'edit':
            var leftPos = (screen.availWidth - 800) / 2
            var topPos = (screen.availHeight - 600) / 2
            var popupWin = window.open('admin_publish_eidt.aspx?ac=edit&nodeid=' + NodeID + '&id=' + contentid, 'editor', 'width=800,height=600,scrollbars=no,resizable=yes,titlebar=0,top=' + topPos + ',left=' + leftPos);

    }

}
 
 